This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
Might be easier and smarter to do PDF instead of MS Word.
Not sure if the below code will help but it is what I found in my code store db
Export to Word (Lotus Script)
Code / Description
This script will export domino Data using lotus script to microsoft word. This example will retrieve notes.ini variables and send them to ms word and saves the file as text file.
On line wordobj.ActiveDocument.SaveAs "c:\stagingr6\notes.ini",2
The 2 will save the file as text format. You can use the below numbers to save the file to a different format.
Usage / Example
'to prevent error for directory already created with mkdir line
On Error Resume Next
' Initialize variables
Dim session As NotesSession
Dim curdb As NotesDatabase
Dim ClientDataPath As String
Dim IdFileOnClient As String
Dim idFileNewOnClient As String
Dim ClientLocationDoc As String
Dim ClientMailSrv As String
Dim ClientMailFile As String
Dim wordobj As Variant
'Get session and database
Set session = New NotesSession
Set curdb = session.CurrentDatabase
' Get Client notes.ini information
ClientLocationDoc = session.GetEnvironmentString("Location",True)
ClientMailSrv = session.GetEnvironmentString("MailServer",True)
ClientMailFile = session.GetEnvironmentString("MailFile",True)
ClientDataPath = session.GetEnvironmentString("Directory",True)
IdFileOnClient = session.GetEnvironmentString("KeyFilename",True)
If Instr(idFileOnClient,"\")<>0 Then
IdFileNewOnClient = Strrightback(IdFileOnClient,"\")
Else
idFileNewOnClient = IdFileOnClient
End If
'Get hangle of word object
Set wordobj = CreateObject ("Word.Application")
' open document and show application
wordobj.Documents.Add
wordobj.Visible = True
wordobj.Activate